use utf8;
package MyApp::Schema::Result::CharacterT;

# Created by DBIx::Class::Schema::Loader
# DO NOT MODIFY THE FIRST PART OF THIS FILE

=head1 NAME

MyApp::Schema::Result::CharacterT

=cut

use strict;
use warnings;

use base 'DBIx::Class::Core';

=head1 COMPONENTS LOADED

=over 4

=item * L<DBIx::Class::InflateColumn::DateTime>

=back

=cut

__PACKAGE__->load_components("InflateColumn::DateTime");

=head1 TABLE: C<character_t>

=cut

__PACKAGE__->table("character_t");

=head1 ACCESSORS

=head2 char_name

  data_type: 'text'
  is_nullable: 0

=head2 char_level

  data_type: 'integer'
  default_value: 0
  is_nullable: 1

=head2 exp_points

  data_type: 'integer'
  default_value: 0
  is_nullable: 1

=head2 char_type

  data_type: 'char'
  is_nullable: 1

=head2 max_hit_pts

  data_type: 'integer'
  default_value: 0
  is_nullable: 1

=head2 max_mana

  data_type: 'integer'
  default_value: 0
  is_nullable: 1

=head2 curr_hit_pts

  data_type: 'integer'
  default_value: 0
  is_nullable: 1

=head2 curr_mana

  data_type: 'integer'
  default_value: 0
  is_nullable: 1

=head2 last_played

  data_type: 'date'
  is_nullable: 1

=head2 created_on

  data_type: 'date'
  default_value: CURRENT_DATE
  is_nullable: 1

=head2 acct_name

  data_type: (empty string)
  is_foreign_key: 1
  is_nullable: 1

=head2 reg_name

  data_type: (empty string)
  is_foreign_key: 1
  is_nullable: 1

=cut

__PACKAGE__->add_columns(
  "char_name",
  { data_type => "text", is_nullable => 0 },
  "char_level",
  { data_type => "integer", default_value => 0, is_nullable => 1 },
  "exp_points",
  { data_type => "integer", default_value => 0, is_nullable => 1 },
  "char_type",
  { data_type => "char", is_nullable => 1 },
  "max_hit_pts",
  { data_type => "integer", default_value => 0, is_nullable => 1 },
  "max_mana",
  { data_type => "integer", default_value => 0, is_nullable => 1 },
  "curr_hit_pts",
  { data_type => "integer", default_value => 0, is_nullable => 1 },
  "curr_mana",
  { data_type => "integer", default_value => 0, is_nullable => 1 },
  "last_played",
  { data_type => "date", is_nullable => 1 },
  "created_on",
  { data_type => "date", default_value => \"CURRENT_DATE", is_nullable => 1 },
  "acct_name",
  { data_type => "", is_foreign_key => 1, is_nullable => 1 },
  "reg_name",
  { data_type => "", is_foreign_key => 1, is_nullable => 1 },
);

=head1 PRIMARY KEY

=over 4

=item * L</char_name>

=back

=cut

__PACKAGE__->set_primary_key("char_name");

=head1 RELATIONS

=head2 acct_name

Type: belongs_to

Related object: L<MyApp::Schema::Result::Account>

=cut

__PACKAGE__->belongs_to(
  "acct_name",
  "MyApp::Schema::Result::Account",
  { acct_name => "acct_name" },
  {
    is_deferrable => 0,
    join_type     => "LEFT",
    on_delete     => "NO ACTION",
    on_update     => "NO ACTION",
  },
);

=head2 creep_instantiations

Type: has_many

Related object: L<MyApp::Schema::Result::CreepInstantiation>

=cut

__PACKAGE__->has_many(
  "creep_instantiations",
  "MyApp::Schema::Result::CreepInstantiation",
  { "foreign.item_instantiation_fk" => "self.char_name" },
  { cascade_copy => 0, cascade_delete => 0 },
);

=head2 item_instantiations

Type: has_many

Related object: L<MyApp::Schema::Result::ItemInstantiation>

=cut

__PACKAGE__->has_many(
  "item_instantiations",
  "MyApp::Schema::Result::ItemInstantiation",
  { "foreign.char_name_fk" => "self.char_name" },
  { cascade_copy => 0, cascade_delete => 0 },
);

=head2 rans_into

Type: has_many

Related object: L<MyApp::Schema::Result::RanInto>

=cut

__PACKAGE__->has_many(
  "rans_into",
  "MyApp::Schema::Result::RanInto",
  { "foreign.char_name_fk" => "self.char_name" },
  { cascade_copy => 0, cascade_delete => 0 },
);

=head2 reg_name

Type: belongs_to

Related object: L<MyApp::Schema::Result::Region>

=cut

__PACKAGE__->belongs_to(
  "reg_name",
  "MyApp::Schema::Result::Region",
  { reg_name => "reg_name" },
  {
    is_deferrable => 0,
    join_type     => "LEFT",
    on_delete     => "NO ACTION",
    on_update     => "NO ACTION",
  },
);

=head2 creep_id_fks

Type: many_to_many

Composing rels: L</rans_into> -> creep_id_fk

=cut

__PACKAGE__->many_to_many("creep_id_fks", "rans_into", "creep_id_fk");


# Created by DBIx::Class::Schema::Loader v0.07042 @ 2015-01-05 23:33:59
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:vVdobt+CjIV4mn5wfcZJXw


# You can replace this text with custom code or comments, and it will be preserved on regeneration
1;
